package com.itheima.reggie.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.reggie.domain.Category;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CategoryMapper extends BaseMapper<Category> {
    List<Category> findAll();

    void add(Category category);

    void update(Category category);

    void delete(Long id);

    //查询菜品表该菜品分类下的菜品数量
    Integer countDishByCategoryId(Long categoryId);

    //查询套餐表改套餐分类下套餐的数量
    Integer countSetMealByCategoryId(Long categoryId);

    List<Category> selectByType(Integer type);
}
